import Vue from 'vue'
import Router from 'vue-router'
import routes from '~pages'

Vue.use(Router)

routes.unshift({
  path: '/',
  redirect: '/vue3Advance/compToHtml'
})

const router =  new Router({
  // mode: 'history', // 去掉url中的#
  mode: 'hash', // 去掉url中的#
  routes: routes
})

// 获取路由地址
console.log(router.getRoutes())



export default router
